
#pragma once

#include "base/core/singleton.h"
#include "Common/TableDefine.h"


class TreasureTrapCfg : public ManualSingleton <TreasureTrapCfg>
{
	friend ManualSingleton <TreasureTrapCfg>;
public:
	TreasureTrapCfg();
	~TreasureTrapCfg();
	bool Init(const char *szCfgFile, const char *szSplitChar);
	bool UnInit();
	void Clear();
	const TreasureTrapCfgInfo *GetTreasureTrapCfgInfo(int32_t id);
	const TreasureTrapCfgMap *GetTreasureTrapCfgMap() { return &m_TreasureTrapCfgMap; }
private:
	TreasureTrapCfgMap m_TreasureTrapCfgMap;
};

#define  g_MakeTreasureTrapCfgTable() (TreasureTrapCfg::Instance())
#define  g_GetTreasureTrapCfgTable() (TreasureTrapCfg::GetInstance())
#define  g_DelTreasureTrapCfgTable() (TreasureTrapCfg::Destroy())